export default class IdEnumItem {
  #name
  #id

  constructor(id, name, extra = null) {
    this.#id = id
    this.#name = name
    if (extra) {
      Object.assign(this, extra)
      this.$extra = extra
    }
  }

  toString() {
    return this.#name
  }

  valueOf() {
    return this.#id
  }

  get id() {
    return this.#id
  }

  get name() {
    return this.#name
  }

  get label() {
    return this.name
  }
}
